package com.xy;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/13 11:00
 * @description
 */
public class DVDPlayer {

    // 使用单例模式
    private static  final DVDPlayer instance = new DVDPlayer();

    private DVDPlayer() {}

    public static DVDPlayer getInstance() {
        return instance;
    }

    public void on() {
        System.out.println("dvd 打开了...");
    }

    public void off() {
        System.out.println("dvd 关闭了...");
    }

    public void play() {
        System.out.println("dvd 播放中...");
    }

    public void pause() {
        System.out.println("dvd 暂停了...");
    }
}
